﻿Public Class frmQuanTri
    Public _dangtinDTO As New DangTinDTO
    Public _dangtinBUS As New DangTinBUS
    Public _tableDangTin As New DataTable
    Public _dangkyDTO As New DangKyDTO
    Public _dangkyBUS As New DangKyBUS
    Public _tableDangKy As New DataTable
    Public _diachiBUS As New DiaChiBUS
    Public _diachiDTO As New DiaChiDTO
    Public _taikhoanDTO As New TaiKhoanDTO
    Public _taikhoanBUS As New TaiKhoanBUS
    Public _tableTaiKhoan As New DataTable
    '------------------------------------------------------------------------------------------------
    Public dkDTO As New DangKyDTO
    Public dkBUS As New DangKyBUS
    Public tkDTO As New TaiKhoanDTO
    Public tkBUS As New TaiKhoanBUS
    Public svDTO As New SinhVienDTO
    Public svBUS As New SinhVienBUS
    Public cnDTO As New ChuNhaDTO
    Public cnBUS As New ChuNhaBUS
    Public kvDTO As New KhuVucDTO
    Public kvBUS As New KhuVucBUS
    Public loainhaDTO As New LoaiNhaDTO
    Public loainhaBUS As New LoaiNhaBUS
    '------------------------------------------------------------------------------------------------
    Private Sub btnThemTinBai_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnThemTinBai.ItemClick
        Dim frmThemTin As New frmThemMoiTinBai
        frmThemTin.ShowDialog()
    End Sub

    Private Sub btnCapNhatTinBai_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnCapNhatTin.ItemClick
        If _dangtinDTO.TieuDe <> "" Then
            Dim frmCapNhatTin As New frmAD_CapNhatTinBai
            frmCapNhatTin._dangtinDTO = _dangtinDTO
            frmCapNhatTin.ShowDialog()
        End If
    End Sub

    Private Sub btnTimKiemTK_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTimKiemTK.ItemClick
        pnTimKiemTaiKhoan.Show()
    End Sub

    Private Sub btnTimKiemTin_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTimKiemTin.ItemClick
        pnTimKiemTinBai.Show()
    End Sub
    Private Sub btnCapNhatTK_ItemClick_1(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnCapNhatTK.ItemClick
        Dim frmCapNhatTK As New frmAD_CapNhatTaiKhoan
        frmCapNhatTK._taikhoanDTO=_taikhoanDTO
        frmCapNhatTK.ShowDialog()
    End Sub
    Private Sub dgvTaiKhoan_RowEnter(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvTaiKhoan.RowEnter
        Try
            _taikhoanDTO.MaLoai = Convert.ToInt32(dgvTaiKhoan.Rows(e.RowIndex).Cells("MaLoai").Value.ToString())
            _taikhoanDTO.TenTaiKhoan = dgvTaiKhoan.Rows(e.RowIndex).Cells("TenTaiKhoan").Value.ToString()
            _taikhoanDTO.MatKhau = dgvTaiKhoan.Rows(e.RowIndex).Cells("MatKhau").Value.ToString()
            _taikhoanDTO.TrangThai = Convert.ToInt32(dgvTaiKhoan.Rows(e.RowIndex).Cells("TrangThai").Value.ToString())
            _taikhoanDTO.MaTaiKhoan = Convert.ToInt32(dgvTaiKhoan.Rows(e.RowIndex).Cells("MaTaiKhoan").Value.ToString())
        Catch ex As Exception

        End Try
    End Sub
    Private Sub btnThemMoiTK_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnThemMoiTK.ItemClick
        Dim frmThemTK As New frmAD_NguoiDung
        frmThemTK.ShowDialog()
    End Sub

    Private Sub btnThemDK_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnThemDK.ItemClick
        Dim frmThemDK As New frmThemDangKyThue
        frmThemDK.ShowDialog()
    End Sub

    Private Sub btnCapNhatDK_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnCapNhatDK.ItemClick
        Dim frmcapnhatdk As New frmCapNhatDangKy
        frmcapnhatdk.ShowDialog()
    End Sub

    Private Sub barTrangChinh_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles barTrangChinh.ItemClick
        Dim frmChinh As New frmTrangChu
        frmTrangChu.ID = "1"
        frmChinh.Show()
        Me.Hide()
    End Sub

    Private Sub btnThoatDN_Click(sender As System.Object, e As System.EventArgs) Handles btnThoatDN.Click
        Dim frmChinh As New frmTrangChu
        frmChinh.Show()
        Me.Hide()
    End Sub

    Private Sub btnTatCaTin_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTatCaTin.ItemClick
        _tableDangTin = _dangtinBUS.GetAll()
        dgvDangTin.DataSource = _tableDangTin
        dgvDangTin.Show()
        dgvDangKy.Hide()
        dgvTaiKhoan.Hide()
    End Sub

    Private Sub btnTinDaDuyet_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTinDaDuyet.ItemClick
        _tableDangTin = _dangtinBUS.GetItemTinhTrang(1)
        dgvDangTin.DataSource = _tableDangTin
        dgvDangTin.Show()
        dgvTaiKhoan.Hide()
        dgvDangKy.Hide()
    End Sub

    Private Sub btnTinChuaDuyet_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTinChuaDuyet.ItemClick
        _tableDangTin = _dangtinBUS.GetItemTinhTrang(2)
        dgvDangTin.DataSource = _tableDangTin
        dgvDangTin.Show()
        dgvTaiKhoan.Hide()
        dgvDangKy.Hide()
    End Sub

    Private Sub btnTinDaDong_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTinDaDong.ItemClick
        _tableDangTin = _dangtinBUS.GetItemTinhTrang(3)
        dgvDangTin.DataSource = _tableDangTin
        dgvDangTin.Show()
        dgvTaiKhoan.Hide()
        dgvDangKy.Hide()
    End Sub

    Private Sub btnTinDaXoa_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTinDaXoa.ItemClick
        _tableDangTin = _dangtinBUS.GetItemTinhTrang(4)
        dgvDangTin.DataSource = _tableDangTin
        dgvDangTin.Show()
        dgvTaiKhoan.Hide()
        dgvDangKy.Hide()
    End Sub
    Private Sub btnDSDangKy_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDSDangKy.ItemClick
        _tableDangKy = _dangkyBUS.GetAll()
        dgvDangKy.DataSource = _tableDangKy
        dgvDangKy.Show()
        dgvDangTin.Hide()
    End Sub
    Private Sub btnDSTaiKhoan_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDSTaiKhoan.ItemClick
        _tableTaiKhoan = _taikhoanBUS.GetAll()
        dgvTaiKhoan.DataSource = _tableTaiKhoan
        dgvDangKy.Hide()
        dgvDangTin.Hide()
        dgvTaiKhoan.Show()
    End Sub

    Private Sub btnTKSinhVien_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTKSinhVien.ItemClick
        _tableTaiKhoan = _taikhoanBUS.GetItemLoaiTK(2)
        dgvTaiKhoan.DataSource = _tableTaiKhoan
        dgvTaiKhoan.Show()
        dgvDangTin.Hide()
        dgvDangKy.Hide()
    End Sub

    Private Sub btnTKChuNha_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTKChuNha.ItemClick
        _tableTaiKhoan = _taikhoanBUS.GetItemLoaiTK(3)
        dgvTaiKhoan.DataSource = _tableTaiKhoan
        dgvTaiKhoan.Show()
        dgvDangTin.Hide()
        dgvDangKy.Hide()
    End Sub
    Private Sub btnXoaTin_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnXoaTin.ItemClick
        If _dangtinDTO.TieuDe <> "" Then
            Dim result As DialogResult = MessageBox.Show("Bạn có chắc chắn xóa không?", "Câu hỏi", MessageBoxButtons.YesNo)
            If result = DialogResult.Yes Then
                _diachiBUS.Delete(_diachiDTO)
                _dangtinBUS.Delete(_dangtinDTO)
                '---------------------------------------------------------------------------------------------------------------------------
                _tableDangTin = _dangtinBUS.GetAll()
                dgvDangTin.DataSource = _tableDangTin
                dgvDangTin.Refresh()
            End If
        End If
    End Sub
    Private Sub dgvDangTin_RowEnter(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvDangTin.RowEnter
        Try
            cnDTO = cnBUS.GetItemMaChuNha(Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("MaChuNha").Value.ToString()))
            '----------------------------------------------------------------------------------------------------
            _dangtinDTO.MaDangTin = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("MaDangTin").Value.ToString())
            _diachiDTO.MaDiaChi = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("MaDiaChi").Value.ToString())
            '------------------------------------------------------------------------------------------------------
            _dangtinDTO.ChoNamThue = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("ChoNamThue").Value.ToString())
            _dangtinDTO.ChoNuThue = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("ChoNuThue").Value.ToString())
            _dangtinDTO.ChoNauAn = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("ChoNauAn").Value.ToString())
            _dangtinDTO.GanCho = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("GanCho").Value.ToString())
            _dangtinDTO.GanTramXeBuyt = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("GanTramXeBuyt").Value.ToString())
            _dangtinDTO.TruyenHinhCap = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("TruyenHinhCap").Value.ToString())
            _dangtinDTO.Internet = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("Internet").Value.ToString())
            _dangtinDTO.DienTich = Convert.ToSingle(dgvDangTin.Rows(e.RowIndex).Cells("DienTich").Value.ToString())
            _dangtinDTO.MaDiaChi = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("MaDiaChi").Value.ToString())
            _dangtinDTO.MaLoaiNha = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("MaLoaiNha").Value.ToString())
            _dangtinDTO.MaLoaiTin = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("MaLoaiTin").Value.ToString())
            _dangtinDTO.OGhep = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("OGhep").Value.ToString())
            _dangtinDTO.OChungChu = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("OChungChu").Value.ToString())
            _dangtinDTO.SucChua = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("SucChua").Value.ToString())
            _dangtinDTO.TieuDe = dgvDangTin.Rows(e.RowIndex).Cells("TieuDeTin").Value.ToString()
            _dangtinDTO.GiaThue = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("GiaThue").Value.ToString())
            _dangtinDTO.MaChuNha = Convert.ToInt32(dgvDangTin.Rows(e.RowIndex).Cells("MaChuNha").Value.ToString())
            _dangtinDTO.ThoiGianDangTin = Now
            _dangtinDTO.ThoiGianDongTin = Now
            '_dangTinDTO.ThoiGianDangTin = Convert.ToDateTime(dgvChinh.Rows(e.RowIndex).Cells("ThoiGianDangTin").Value)
            '_dangTinDTO.ThoiGianDongTin = Convert.ToDateTime(dgvChinh.Rows(e.RowIndex).Cells("ThoiGianDongTin").Value)
            'cnDTO = cnBUS.GetItemID(_dangtinDTO.MaChuNha)
        Catch ex As Exception

        End Try
    End Sub

    Private Sub btnDKCapNhat_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDKCapNhat.ItemClick
        If dkDTO.TieuDe <> "" Then
            Dim frmcapnhat As New frmAD_CapNhatDangKy
            frmcapnhat._dkDTO = dkDTO
            frmcapnhat.ShowDialog()
        End If
    End Sub

    Private Sub dgvDangKy_RowEnter(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvDangKy.RowEnter
        Try
            svDTO = svBUS.GetItemMaSinhVien(Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("MaSinhVien").Value.ToString()))
            '----------------------------------------------------------------------------------------------------
            dkDTO.MaDangKy = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("MaDangKy").Value.ToString())
            '------------------------------------------------------------------------------------------------------
            dkDTO.MaKhuVucThue = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("MaKhuVucThue").Value.ToString())
            dkDTO.ChoNamThue = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("ChoNamThue").Value.ToString())
            dkDTO.ChoNuThue = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("ChoNuThue").Value.ToString())
            dkDTO.ChoNauAn = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("ChoNauAn").Value.ToString())
            dkDTO.GanCho = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("GanCho").Value.ToString())
            dkDTO.GanTramXeBuyt = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("GanTramXeBuyt").Value.ToString())
            dkDTO.TruyenHinhCap = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("TruyenHinhCap").Value.ToString())
            dkDTO.Internet = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("Internet").Value.ToString())
            dkDTO.DienTich = Convert.ToSingle(dgvDangKy.Rows(e.RowIndex).Cells("DienTich").Value.ToString())
            dkDTO.MaLoaiNha = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("MaLoaiNha").Value.ToString())
            dkDTO.OGhep = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("OGhep").Value.ToString())
            dkDTO.OChungChu = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("OChungChu").Value.ToString())
            dkDTO.SucChua = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("SucChua").Value.ToString())
            dkDTO.TieuDe = dgvDangKy.Rows(e.RowIndex).Cells("TieuDe").Value.ToString()
            dkDTO.GiaThue = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("GiaThue").Value.ToString())
            dkDTO.MaSinhVien = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("MaSinhVien").Value.ToString())
            dkDTO.TrangThai = Convert.ToInt32(dgvDangKy.Rows(e.RowIndex).Cells("TrangThai").Value.ToString())
            dkDTO.ThoiGianDangKy = Now
            dkDTO.ThoiGianDong = Now
        Catch ex As Exception

        End Try
    End Sub

    Private Sub btnDanhSachDK_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDanhSachDK.ItemClick
        _tableDangKy = _dangkyBUS.GetAll()
        dgvDangKy.DataSource = _tableDangKy
        dgvDangKy.Show()
        dgvDangTin.Hide()
    End Sub

    Private Sub btnDKChuaDuyet_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDKChuaDuyet.ItemClick
        _tableDangKy = _dangkyBUS.GetItemTrangThai(2)
        dgvDangKy.DataSource = _tableDangKy
    End Sub

    Private Sub btnDKDaDong_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDKDaDong.ItemClick
        _tableDangKy = _dangkyBUS.GetItemTrangThai(3)
        dgvDangKy.DataSource = _tableDangKy
    End Sub

    Private Sub btnDKDaXoa_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDKDaXoa.ItemClick
        _tableDangKy = _dangkyBUS.GetItemTrangThai(4)
        dgvDangKy.DataSource = _tableDangKy
    End Sub

    Private Sub btnDKDaDuyet_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDKDaDuyet.ItemClick
        _tableDangKy = _dangkyBUS.GetItemTrangThai(1)
        dgvDangKy.DataSource = _tableDangKy
    End Sub

    Private Sub btnDKXoa_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDKXoa.ItemClick
        If dkDTO.TieuDe <> "" Then
            Dim result1 As DialogResult = MessageBox.Show("Bạn có chắc chắn muốn xóa nó?", "Câu hỏi", MessageBoxButtons.YesNo)
            If result1 = DialogResult.Yes Then
                dkBUS.Delete(dkDTO)
                _tableDangKy = dkBUS.GetAll()
                dgvDangKy.DataSource = _tableDangKy
            End If
        End If
    End Sub

    Private Sub btnAD_XemChiTiet_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnAD_XemChiTiet.ItemClick
        If _dangtinDTO.TieuDe <> "" Then
            Dim frmXemChiTiet As New frmAD_XemChiTietTinNha
            frmXemChiTiet._dangtinDTO = _dangtinDTO
            frmXemChiTiet._chunhaDTO = cnDTO
            frmXemChiTiet.ShowDialog()
        End If
    End Sub

    Private Sub btnDKXemChiTiet_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDKXemChiTiet.ItemClick
        If dkDTO.TieuDe <> "" Then
            Dim frmXemChiTiet As New frmXemChiTietDK
            frmXemChiTiet._dkDTO = dkDTO
            frmXemChiTiet._svDTO = svDTO
            frmXemChiTiet.ShowDialog()
        End If
    End Sub

    
    Private Sub btnTK_QuanTri_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTK_QuanTri.ItemClick
        _tableTaiKhoan = _taikhoanBUS.GetItemLoaiTK(1)
        dgvTaiKhoan.DataSource = _tableTaiKhoan
        dgvTaiKhoan.Show()
        dgvDangTin.Hide()
        dgvDangKy.Hide()
    End Sub
    Public _quantriDTO As New QuanTriDTO
    Public _quantriBUS As New QuanTriBUS
    Public _chunhaDTO As New ChuNhaDTO
    Public _chunhaBUS As New ChuNhaBUS
    Public _sinhvienDTO As New SinhVienDTO
    Public _sinhvienBUS As New SinhVienBUS
    Private Sub btnXoaTK_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnXoaTK.ItemClick
        Dim result As DialogResult = MessageBox.Show("Bạn có chắc chắn thực hiện điều này?", "Thông báo", MessageBoxButtons.YesNo)
        If result = DialogResult.Yes Then
            _taikhoanDTO.TrangThai = 0
            _taikhoanBUS.UpdateTrangThai(_taikhoanDTO)
        End If
    End Sub

    Private Sub btnTaiKhoanXoa_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTaiKhoanXoa.ItemClick
        _tableTaiKhoan = _taikhoanBUS.GetItemTrangThai(0)
        dgvTaiKhoan.DataSource = _tableTaiKhoan
        dgvDangKy.Hide()
        dgvDangTin.Hide()
        dgvTaiKhoan.Show()
    End Sub

    Private Sub btnTaiKhoanDangMo_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTaiKhoanDangMo.ItemClick
        _tableTaiKhoan = _taikhoanBUS.GetItemTrangThai(1)
        dgvTaiKhoan.DataSource = _tableTaiKhoan
        dgvDangKy.Hide()
        dgvDangTin.Hide()
        dgvTaiKhoan.Show()
    End Sub

    Private Sub frmQuanTri_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub btnSaoLuuDuLieu_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnSaoLuuDuLieu.ItemClick
        Dim frm As New frmSaoLuuDuLieu
        frm.ShowDialog()
    End Sub

    Private Sub btnPhucHoiDuLieu_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnPhucHoiDuLieu.ItemClick
        Dim frm As New frmPhucHoiDuLieu
        frm.ShowDialog()
    End Sub

    Private Sub btnQuayVe_Click(sender As System.Object, e As System.EventArgs) Handles btnQuayVe.Click
        Dim frmChinh As New frmTrangChu
        frmTrangChu.ID = "1"
        frmChinh.Show()
        Me.Hide()
    End Sub

    Private Sub btnThemLoaiNha_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnThemLoaiNha.ItemClick
        Dim frm As New frmAD_ThemLoaiNha
        frm.ShowDialog()
    End Sub

    Private Sub btnThemTin_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnThemTin.ItemClick
        Dim frm As New frmAD_ThemMoiTinBai
        frm.ShowDialog()
    End Sub

    Private Sub btnDangKy_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDangKy.ItemClick
        Dim frm As New frmAD_ThemMoiDangKy
        frm.ShowDialog()
    End Sub

    Private Sub BarButtonItem6_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem6.ItemClick
        Dim frm As New frmAD_Import
        frm.ShowDialog()
    End Sub

    Private Sub BarButtonItem10_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem10.ItemClick
        Dim frm As New frmAD_Export
        frm.ShowDialog()
    End Sub

    Private Sub btnHuongDan_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnHuongDan.ItemClick
        Process.Start("Huong dan su dung.chm")
    End Sub

    Private Sub BarButtonItem1_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
        Dim frm As New frmVePhanMem
        frm.ShowDialog()
    End Sub
End Class